package com.nuanshui.heatedloan.credit.dal.mapper;

import com.nuanshui.heatedloan.credit.form.CustomerCreditAuditForm;
import com.nuanshui.heatedloan.credit.model.AuditRequestParam;
import com.nuanshui.heatedloan.credit.model.CreditAuditInfo;
import com.nuanshui.heatedloan.credit.vo.CustomerCreditAuditVO;
import com.nuanshui.heatedloan.pageable.Pager;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by wangxw on 2017/7/29.
 */
public interface CustomerCreditAuditMapper {

    /***
     *  1 借款列表  2 未分配  3  初审列表  4 终审列表
     * @param listType
     * @param pager
     * @param param
     * @return
     */
    public List<CreditAuditInfo> getCreditAuditInfo(@Param("listType")int listType,
                                                    @Param("pager") Pager<CreditAuditInfo> pager,
                                                    @Param("param") AuditRequestParam param);

    /***
     * 获取历史清单接口
     * @param pager
     * @param param
     * @return
     */
    public List<CreditAuditInfo> getHistoryCreditAuditInfo(@Param("pager")Pager<CreditAuditInfo> pager,
                                                           @Param("param")AuditRequestParam param);

    /***
     *
     * @param customerCreditAuditForm
     */
    public void save(CustomerCreditAuditForm customerCreditAuditForm);

    /***
     * 分配订单
     * @param customerCreditAuditForms
     */
    public void distributionOrder(List<CustomerCreditAuditForm> customerCreditAuditForms);


    /***
     * 获取某个订单所有的
     * @param orderId
     * @return
     */
    public List<CustomerCreditAuditVO> getCreditAuditVOByOrderId(@Param("orderId")String orderId);

    /***
     * 进入下个流程  把上次流程进入状态改为无效
     * @param orderIds
     * @param sourStatus
     */
    public void updateStatus(@Param("orderIds")List<String> orderIds,@Param("sourStatus")List<Integer> sourStatus
            ,@Param("desStatus")int desStatus);

}
